package com.blog.common.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.blog.common.domain.annotation.Convert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 相册
 * </p>
 *
 * @author Valerie
 * @since 2023-03-11
 */
@Getter
@Setter
@TableName("tb_photo_album")
@ApiModel(value = "PhotoAlbum对象", description = "相册")
public class PhotoAlbum implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("相册名")
    @TableField("album_name")
    private String albumName;

    @ApiModelProperty("相册描述")
    @TableField("album_desc")
    private String albumDesc;

    @ApiModelProperty("相册封面")
    @TableField("album_cover")
    @Convert
    private String albumCover;

    @ApiModelProperty("是否删除")
    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;


    @ApiModelProperty("是否顶置 0否 1是")
    @TableField("is_top")
    private Integer isTop;

    @ApiModelProperty("状态值 1公开 2私密")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
}
